﻿using System;

namespace FirstFloor.P2P
{
    /// <summary>
    /// Represents a p2p data error.
    /// </summary>
    public class P2PDataError
    {
        private int type;
        private string data;

        /// <summary>
        /// Initializes a new instance of the <see cref="P2PError"/> class.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="data">The data.</param>
        public P2PDataError(int type, string data)
        {
            this.type = type;
            this.data = data;
        }

        /// <summary>
        /// Gets the type of the error.
        /// </summary>
        /// <value>The type.</value>
        public int Type
        {
            get { return this.type; }
        }

        /// <summary>
        /// Gets the data associated with this error instance.
        /// </summary>
        /// <value>The data.</value>
        public string Data
        {
            get { return this.data; }
        }
    }
}
